<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="strutsTags"%>
<%
	response.setHeader("Pragma", "No-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setDateHeader("Expires", 0);
%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<html>
	<head>
		<base href="<%=basePath%>">
		<link rel="stylesheet" href="resource/css/style.css" type="text/css" />
		<jsp:include flush="true" page="/sitemesh/jsPackage.jsp"></jsp:include>
		<script type="text/javascript" src="resource/js/hrm/common.js"></script>
	</head>
	<body>
		<s:hidden value="positionId" />
		<table cellpadding="0" cellspacing="0" width="100%" border="0"
			class="gridtableList">
			<tr>
				<td align="right">
					所属部门:
				</td>
				<td>
					<s:property id="" value="pb.pbDeptId.departmentName" />
				</td>
				<td align="right">
					负责职位:
				</td>
				<td>
					<span id="isChargePos"></span>
				</td>
			</tr>

			<tr>
				<td align="right">
					职位名称:
				</td>
				<td>
					<s:property value="pb.pbName" />
				</td>
				<td align="right">
					员工姓名:
				</td>
				<td>
					<s:if test="position.positionEmpNo==null">
	          空缺
	      </s:if>
					<s:else>
						<s:property value="position.positionEmpNo.empName" />
					</s:else>
				</td>

			</tr>

			<tr>
				<td align="right">
					上级职位:
				</td>
				<td>
					<s:if test="parentPb != null">
						<a class="listViewTdLinkS1"> <s:property
								value="parentPb.pbName" /> <s:if
								test="parentPosition.positionEmpNo==null">(空缺)</s:if> <s:else>(<s:property
									value="parentPosition.positionEmpNo.empName" />)</s:else> </a>
					</s:if>
					<s:else>
	    	空缺(空缺)
	    </s:else>
				</td>

				<td align="right">
					员工编号:
				</td>
				<td>
					<s:if test="position.positionEmpNo==null">
	          空缺
	      </s:if>
					<s:else>
						<s:property value="position.positionEmpNo.empDistinctNo" />
					</s:else>
				</td>

			</tr>
		</table>

	</body>
	<script type="text/javascript">
	//设置是否负责职位的显示
	var chargeVal = '<s:property value='
	pb.pbInCharge
	'/>';
	if (chargeVal == 0) {
		$('#isChargePos').html('不是');
	} else if (chargeVal == 1) {
		$('#isChargePos').html('是');
	}

	var tree = window.parent.tree;
	var pbTree = window.parent.pbTree;
	var nodeArr = window.parent.nodeArr;
	function shiftToSupPos(posId, pageType) {
		// 选中父节点；
		tree.selectItem(posId);
		tree.focusItem(posId);

		// 将当前页面刷新为父节点对应页面；
		var url = "";
		if (pageType == 'profile') {
			url = "profile/positionInfo.action?positionId=" + posId
					+ "&pageType=profile";
		} else if (pageType == 'examin') {
			url = "profile/examinWfConfigList.action?positionId=" + posId
					+ "&pageType=examin";
		} else if (pageType == 'training') {
			url = "profile/trainWfConfigList.action?positionId=" + posId
					+ "&pageType=training";
		} else if (pageType == 'recruitment') {
			url = "profile/recruitWfConfigList.action?positionId=" + posId
					+ "&pageType=recruitment";
		} else if (pageType == 'system') {
			url = "profile/areaRanageAuthorityPosManage.action?positionId="
					+ posId + "&resultModel=99&pageType=system";
		}

		window.parent.refreshIFrame(url);
	}
</script>
</html>